package com.ruoyi.whzj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.whzj.mapper.WhUserLittleMapper;
import com.ruoyi.whzj.domain.WhUserLittle;
import com.ruoyi.whzj.service.IWhUserLittleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户小号Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-11-23
 */
@Service
public class WhUserLittleServiceImpl implements IWhUserLittleService 
{
    @Autowired
    private WhUserLittleMapper whUserLittleMapper;

    /**
     * 查询用户小号
     * 
     * @param id 用户小号ID
     * @return 用户小号
     */
    @Override
    public WhUserLittle selectWhUserLittleById(String id)
    {
        return whUserLittleMapper.selectWhUserLittleById(id);
    }

    /**
     * 查询用户小号列表
     * 
     * @param whUserLittle 用户小号
     * @return 用户小号
     */
    @Override
    public List<WhUserLittle> selectWhUserLittleList(WhUserLittle whUserLittle)
    {
        return whUserLittleMapper.selectWhUserLittleList(whUserLittle);
    }

    /**
     * 新增用户小号
     * 
     * @param whUserLittle 用户小号
     * @return 结果
     */
    @Override
    public int insertWhUserLittle(WhUserLittle whUserLittle)
    {
        whUserLittle.setCreateTime(DateUtils.getNowDate());
        return whUserLittleMapper.insertWhUserLittle(whUserLittle);
    }

    /**
     * 修改用户小号
     * 
     * @param whUserLittle 用户小号
     * @return 结果
     */
    @Override
    public int updateWhUserLittle(WhUserLittle whUserLittle)
    {
        return whUserLittleMapper.updateWhUserLittle(whUserLittle);
    }

    /**
     * 删除用户小号对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWhUserLittleByIds(String ids)
    {
        return whUserLittleMapper.deleteWhUserLittleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户小号信息
     * 
     * @param id 用户小号ID
     * @return 结果
     */
    @Override
    public int deleteWhUserLittleById(String id)
    {
        return whUserLittleMapper.deleteWhUserLittleById(id);
    }
}
